<?php
final class Controller_Index extends Controller{
    protected function Acquiescent(){
        #幻灯片
        $data=Database::GetRows('select * from app_image where ID>=1 and ID<=5 order by ID asc');
        Template::Assign('SlideData',$data);
        #相册类别
        $data=Database::GetRows('select * from app_album_class order by ID asc');
        Template::Assign('AlbumClassData',$data);
        #最新活动
        $data=Database::GetRows('select * from app_news order by ID desc limit 0,5');
        Template::Assign('NewsData',$data);
        #了解色彩摘要
        $data=Database::GetRowByValue('app_info','ID',1);
        $data['Summary']=str_replace("\n",'<br/>',$data['Summary']);
        $data['Summary']=str_replace("\t",'&nbsp;&nbsp;&nbsp;&nbsp;',$data['Summary']);
        $data['Summary']=str_replace(" ",'&nbsp;',$data['Summary']);
        Template::Assign('AboutSummary',$data['Summary']);
        #渲染模板
        Template::Display('index.html');
    }
}
?>